<%@ taglib uri="/WEB-INF/taglib/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/taglib/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/taglib/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/taglib/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>


<h1><bean:message key="freelances.title.search"/></h1>

<p>
	<c:choose>
		<c:when test="${search}"></c:when>
		<c:otherwise>
			<html:link page="/freelances.do?cmd=search"><bean:message key="freelances.search.title" /></html:link>
		</c:otherwise>
	</c:choose>
</p>

<p id="list_freelance">

	<display:table name="freelances" id="row" requestURI="/freelances.do" pagesize="20">

		<display:column sortable="true" property="name" titleKey="freelances.name" />
		<display:column sortable="true" titleKey="freelances.skills">
			<ul>
				<c:forEach var="skill" items="${row.skills}">
					<li>
						${skill.ranking} - <bean:message key="${skill.skill.name}" /> (${skill.grade}/5)
					</li>
				</c:forEach>
			</ul>
		</display:column>
		<display:column sortable="true" property="nbJobAccept" titleKey="freelances.nbJobAccept" />

		<display:setProperty name="paging.banner.placement" value="top" />
		<display:setProperty name="paging.banner.item_name"><bean:message key="freelances.list.item_name" /></display:setProperty>
		<display:setProperty name="paging.banner.items_name"><bean:message key="freelances.list.items_name" /></display:setProperty>

	</display:table>

</p>